<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QtWebApp: stefanfrings::HttpConnectionHandler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QtWebApp
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classstefanfrings_1_1HttpConnectionHandler.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classstefanfrings_1_1HttpConnectionHandler-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">stefanfrings::HttpConnectionHandler Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Alias for QSslConfiguration if OpenSSL is not supported.  
 <a href="classstefanfrings_1_1HttpConnectionHandler.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="httpconnectionhandler_8h_source.html">httpconnectionhandler.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for stefanfrings::HttpConnectionHandler:</div>
<div class="dyncontent">
<div class="center"><img src="classstefanfrings_1_1HttpConnectionHandler__inherit__graph.png" border="0" usemap="#astefanfrings_1_1HttpConnectionHandler_inherit__map" alt="Inheritance graph"/></div>
<map name="astefanfrings_1_1HttpConnectionHandler_inherit__map" id="astefanfrings_1_1HttpConnectionHandler_inherit__map">
<area shape="rect" title="Alias for QSslConfiguration if OpenSSL is not supported." alt="" coords="5,80,215,121"/>
<area shape="rect" title=" " alt="" coords="73,5,147,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for stefanfrings::HttpConnectionHandler:</div>
<div class="dyncontent">
<div class="center"><img src="classstefanfrings_1_1HttpConnectionHandler__coll__graph.png" border="0" usemap="#astefanfrings_1_1HttpConnectionHandler_coll__map" alt="Collaboration graph"/></div>
<map name="astefanfrings_1_1HttpConnectionHandler_coll__map" id="astefanfrings_1_1HttpConnectionHandler_coll__map">
<area shape="rect" title="Alias for QSslConfiguration if OpenSSL is not supported." alt="" coords="5,80,215,121"/>
<area shape="rect" title=" " alt="" coords="73,5,147,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr class="memitem:ad4d57782218e761cd002e84b3707579d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html#ad4d57782218e761cd002e84b3707579d">handleConnection</a> (const <a class="el" href="httpconnectionhandler_8h.html#aac9d80ca2f2f3e2c74506d3b207b02d6">tSocketDescriptor</a> socketDescriptor)</td></tr>
<tr class="memdesc:ad4d57782218e761cd002e84b3707579d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Received from from the listener, when the handler shall start processing a new connection.  <a href="classstefanfrings_1_1HttpConnectionHandler.html#ad4d57782218e761cd002e84b3707579d">More...</a><br /></td></tr>
<tr class="separator:ad4d57782218e761cd002e84b3707579d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a52a1397d46ac3662f325846904f9c5f2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html#a52a1397d46ac3662f325846904f9c5f2">HttpConnectionHandler</a> (const QSettings *settings, <a class="el" href="classstefanfrings_1_1HttpRequestHandler.html">HttpRequestHandler</a> *requestHandler, const QSslConfiguration *sslConfiguration=nullptr)</td></tr>
<tr class="memdesc:a52a1397d46ac3662f325846904f9c5f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classstefanfrings_1_1HttpConnectionHandler.html#a52a1397d46ac3662f325846904f9c5f2">More...</a><br /></td></tr>
<tr class="separator:a52a1397d46ac3662f325846904f9c5f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af47c5713b7e92040d59803bd7c99c9f5"><td class="memItemLeft" align="right" valign="top"><a id="af47c5713b7e92040d59803bd7c99c9f5"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html#af47c5713b7e92040d59803bd7c99c9f5">~HttpConnectionHandler</a> ()</td></tr>
<tr class="memdesc:af47c5713b7e92040d59803bd7c99c9f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:af47c5713b7e92040d59803bd7c99c9f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ce005483981faf3b1b5cabf1fe6c24f"><td class="memItemLeft" align="right" valign="top"><a id="a3ce005483981faf3b1b5cabf1fe6c24f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html#a3ce005483981faf3b1b5cabf1fe6c24f">isBusy</a> ()</td></tr>
<tr class="memdesc:a3ce005483981faf3b1b5cabf1fe6c24f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true, if this handler is in use. <br /></td></tr>
<tr class="separator:a3ce005483981faf3b1b5cabf1fe6c24f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fcffe53d6604499fbb298bbc0fa453e"><td class="memItemLeft" align="right" valign="top"><a id="a7fcffe53d6604499fbb298bbc0fa453e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html#a7fcffe53d6604499fbb298bbc0fa453e">setBusy</a> ()</td></tr>
<tr class="memdesc:a7fcffe53d6604499fbb298bbc0fa453e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark this handler as busy. <br /></td></tr>
<tr class="separator:a7fcffe53d6604499fbb298bbc0fa453e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Alias for QSslConfiguration if OpenSSL is not supported. </p>
<p>The connection handler accepts incoming connections and dispatches incoming requests to to a request mapper. Since HTTP clients can send multiple requests before waiting for the response, the incoming requests are queued and processed one after the other. </p>
<p>Example for the required configuration settings: <code></p><pre>
readTimeout=60000
maxRequestSize=16000
maxMultiPartSize=1000000
</pre><p></code> </p>
<p>The readTimeout value defines the maximum time to wait for a complete HTTP request. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classstefanfrings_1_1HttpRequest.html" title="This object represents a single HTTP request.">HttpRequest</a> for description of config settings maxRequestSize and maxMultiPartSize. </dd></dl>

<p class="definition">Definition at line <a class="el" href="httpconnectionhandler_8h_source.html#l00049">49</a> of file <a class="el" href="httpconnectionhandler_8h_source.html">httpconnectionhandler.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a52a1397d46ac3662f325846904f9c5f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52a1397d46ac3662f325846904f9c5f2">&#9670;&nbsp;</a></span>HttpConnectionHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HttpConnectionHandler::HttpConnectionHandler </td>
          <td>(</td>
          <td class="paramtype">const QSettings *&#160;</td>
          <td class="paramname"><em>settings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classstefanfrings_1_1HttpRequestHandler.html">HttpRequestHandler</a> *&#160;</td>
          <td class="paramname"><em>requestHandler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QSslConfiguration *&#160;</td>
          <td class="paramname"><em>sslConfiguration</em> = <code>nullptr</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>Configuration settings of the HTTP webserver </td></tr>
    <tr><td class="paramname">requestHandler</td><td>Handler that will process each incoming HTTP request </td></tr>
    <tr><td class="paramname">sslConfiguration</td><td>SSL (HTTPS) will be used if not NULL </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="httpconnectionhandler_8cpp_source.html#l00011">11</a> of file <a class="el" href="httpconnectionhandler_8cpp_source.html">httpconnectionhandler.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad4d57782218e761cd002e84b3707579d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4d57782218e761cd002e84b3707579d">&#9670;&nbsp;</a></span>handleConnection</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void HttpConnectionHandler::handleConnection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="httpconnectionhandler_8h.html#aac9d80ca2f2f3e2c74506d3b207b02d6">tSocketDescriptor</a>&#160;</td>
          <td class="paramname"><em>socketDescriptor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">slot</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Received from from the listener, when the handler shall start processing a new connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">socketDescriptor</td><td>references the accepted connection. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="httpconnectionhandler_8cpp_source.html#l00080">80</a> of file <a class="el" href="httpconnectionhandler_8cpp_source.html">httpconnectionhandler.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>httpserver/<a class="el" href="httpconnectionhandler_8h_source.html">httpconnectionhandler.h</a></li>
<li>httpserver/<a class="el" href="httpconnectionhandler_8cpp_source.html">httpconnectionhandler.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>stefanfrings</b></li><li class="navelem"><a class="el" href="classstefanfrings_1_1HttpConnectionHandler.html">HttpConnectionHandler</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
